home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-03-12 | 1.1 KB | 46 lines | [TEXT/CWIE] |
- // DebugMessage.h
-
- #ifndef DebugMessage_h
- #define DebugMessage_h
-
- #ifndef Integers_h
- #include "Integers.h"
- #endif
-
- class ConstData;
-
- class DebugMessage
- {
- private:
- static uint8 message[ maxuint8 + 2 ];
-
- uint8& Length() { return message[0]; }
- const uint8& Length() const { return message[0]; }
-
- const uint8 *PascalString() const { return message; }
- const char *CString() const { return reinterpret_cast<const char *>(message+1); }
-
- public:
- DebugMessage();
- DebugMessage( const char * );
-
- DebugMessage& operator<<( const char * );
- DebugMessage& operator<<( ConstData );
- DebugMessage& operator<<( uint32 );
- DebugMessage& operator<<( int32 );
- DebugMessage& operator<<( void * );
-
- DebugMessage& operator<<( uint16 n ) { return *this << uint32( n ); }
- DebugMessage& operator<<( int16 n ) { return *this << int32( n ); }
- DebugMessage& operator<<( uint8 n ) { return *this << uint32( n ); }
- DebugMessage& operator<<( int8 n ) { return *this << int32( n ); }
-
- inline void Show();
- };
-
- #ifndef ShowDebugMessage_h
- #include "ShowDebugMessage.h"
- #endif
-
- #endif
-